﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JiaofuPaidan
{
    public static class UtilsExt
    {
        #region 日期转换
        public static DateTime? ToDate(this string s)
        {
            if (string.IsNullOrEmpty(s)) return null;

            DateTime result;
            if (!DateTime.TryParse(s, out result)) return null;
            return result;
        }
        #endregion
    }
}
